<script lang="ts" setup>
import { ref } from 'vue'
const backgroundImage = ref('')
const phoneNumber = ref(['19128769631'])
const bottomBgImage = ref('/static/images/cooperation/bg.png')
/**
 * * 调用电话客服
 */
const phoneCSFn = () => {
  uni.showActionSheet({
    itemList: phoneNumber.value,
    success: (success: UniApp.ShowActionSheetRes) => {
      uni.makePhoneCall({
        phoneNumber: phoneNumber.value[success.tapIndex],
        success: (res) => {
          console.log(res)
        },
      })
    },
  })
}
</script>

<template>
  <view>
    <scroll-view scroll-y style="height: 100vh">
      <image class="bgcImg" :src="backgroundImage" mode="scaleToFill" />
      <view class="matBox"></view>
      <view class="bottomFiexd">
        <image class="bottom-bg" :src="bottomBgImage" mode="scaleToFill" />
        <view class="content">
          <view class="_text">申请成为事业合伙人，共创未来！</view>
          <view class="contact-us-box" @tap="phoneCSFn">
            <view class="contact-us">联系我们</view>
          </view>
        </view>
      </view>
    </scroll-view>
  </view>
</template>
<style lang="scss">
.matBox {
  height: 220rpx;
}
.bgcImg {
  width: 100%;
  height: 3487rpx;
}
.bottomFiexd {
  position: fixed;
  left: 0px;
  bottom: 0px;
  width: 100%;
  height: 220rpx;

  .bottom-bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }

  .content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  ._text {
    font-size: 36rpx;
    color: #fff;
    margin-bottom: 20rpx;
  }

  .contact-us-box {
    width: 264rpx;
    height: 72rpx;
    background: #fff;
    border-radius: 32rpx;
    display: flex;
    justify-content: center;
    align-items: center;

    .contact-us {
      font-size: 30rpx;
      color: #ff7a00;
    }
  }
}
</style>
